package main

import (
	"gitee.com/kobeyyf/apibox/filter"
	"gitee.com/kobeyyf/apibox/handler"
)

func ActionSayHello(c *handler.Context) *handler.Response {
	params := filter.NewParams(c)

	params.Add("Message", filter.EmptyToNil(), filter.Required())
	if apiErr := params.Parse(); apiErr != nil {
		return apiErr
	}

	return handler.NewSuccessResponse("hello,world." + params.GetString("Message"))

}
